i = 1
while i <521:
   print((i),"小美，我喜欢你，我在兰工院好想你")
   i += 1


i = 0
sum = 0
while i < 100:
   sum += i
   print("结果为",sum)
   i += 1


import random
num = random.randint(a=1,b=100)
i = 0
flag = True
while flag:
    guess_num = int(input("请输入你要猜的数字"))
    i += 1
    if guess_num == num:
        print("你猜对了")
        print(f"你猜了{i}次了")
        flag = False
    else:
         if guess_num > num:
             print("你猜大了")
         else:
             print("你猜小了")





